#include <iostream>
#include <math.h>
using namespace std;
int main()
{

    int d,b,c,a;
 cout<<"Vvedite a";
 cin>>a;
 cout<<"Vvedite b";
 cin>>b;
 cout<<"Vvedite c";
 cin>>c;
 cout<<"Vvedite d";
 cin>>d;
int x=a*c-d*b;
int y=(a*d+b*c);
if(y<0)
{
    cout<<x<<y<<"i";
}
else
    cout<<x<<"+"<<y<<"i";

return 0;
}
